import request from '@/utils/request'

// 查询单个图片任务列表
export function listPhoto(query) {
  return request({
    url: '/print/photo/list',
    method: 'get',
    params: query
  })
}

// 查询单个图片任务详细
export function getPhoto(singlePhotoId) {
  return request({
    url: '/print/photo/' + singlePhotoId,
    method: 'get'
  })
}

// 新增单个图片任务
export function addPhoto(data) {
  return request({
    url: '/print/photo',
    method: 'post',
    data: data
  })
}

// 修改单个图片任务
export function updatePhoto(data) {
  return request({
    url: '/print/photo',
    method: 'put',
    data: data
  })
}

// 删除单个图片任务
export function delPhoto(singlePhotoId) {
  return request({
    url: '/print/photo/' + singlePhotoId,
    method: 'delete'
  })
}

// 根据任务ID查询照片列表
export function listPhotosByTaskId(photoTaskId, query) {
  return request({
    url: '/print/photo/task/' + photoTaskId,
    method: 'get',
    params: query
  })
}

// 批量删除照片
export function delPhotosBatch(singlePhotoIds) {
  return request({
    url: '/print/photo/batch/' + singlePhotoIds,
    method: 'delete'
  })
}
